package com.news.cloud.jpa.repository;

import com.news.cloud.jpa.domain.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created by hiephn on 2014/06/28.
 */
public interface UserRepository extends JpaRepository<User, Integer> {

    Page<User> findByNameLikeOrFullNameLike(String name, String fullName, Pageable pageable);

    User findByNameAndPassword(String name, String password);

    User findOneByEmail(String email);
}
